Abort page restriction if no null revision can be created
authorMatthias Mullie <git@mullie.eu>
Fri, 21 Jun 2013 14:01:52 +0000 (16:01 +0200)
committerMatthias Mullie <git@mullie.eu>
Mon, 8 Jul 2013 16:23:05 +0000 (18:23 +0200)
commitc819ae88199c1f87bca467e2527997bc102dde0d
tree60b89f8289a991dda1f54b313790fdce5eaf38c4
parentb8438031cfc67df71e16ecd806761d4d916536f7
Abort page restriction if no null revision can be created

In practice, this should not currently be happening: null revision can not be
created if no previous revision exists, which should not be the case where we
call the function in doUpdateRestrictions. However, since newNullRevision can
potentially return null (it's documented that way, perhaps some day in the
future, additional code paths can lead to null), we should check for it.

Also: after completing the restriction updates, the null revision is passed
along to a hook, which is documented[1] to get a Revision object. Right now,
in theory, this could be incorrect.

1: https://www.mediawiki.org/wiki/Manual:Hooks/NewRevisionFromEditComplete

Change-Id: I89b0be823d9933d557470005c390a9102f931684
includes/WikiPage.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc